home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4720 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  852 b 

  1. Path: apm-b325-8.ucsd.edu!user
  2. From: bredelin@sdcc13.ucsd.edu (Benjamin Redelings)
  3. Newsgroups: comp.lang.c++
  4. Subject: g++ 2.7.2 Bug
  5. Date: 31 Jan 1996 21:19:22 GMT
  6. Organization: University of California, San Diego
  7. Message-ID: <bredelin-3101961319210001@apm-b325-8.ucsd.edu>
  8. NNTP-Posting-Host: apm-b325-8.ucsd.edu
  9.  
  10. I've found that g++ 2.7.2 doesn't seem to be able to do 2-step conversions
  11. all the time.
  12.  
  13. My specific problem is this:
  14. I defined the conversions
  15.    (char*)  ->  struct string
  16.    struct string -> struct form\
  17.  
  18.  
  19. Now, I'm getting compiler errors;
  20.  
  21. string s = "abc"  // works
  22. string s = ("abc") //works
  23. form f = s; //works
  24. form f (s); //works
  25. form f("abc") //works
  26. form f = "abc" // the compiler can't figure out how to convert (char*) to form.
  27.  
  28. Is this a bug or a feature?  I can't think of any way it could be intentional...
  29.  
  30.  
  31. Thanks,
  32. BenRI
  33.